package com.oig.sys.auth.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import java.io.Serializable;
import java.util.Date;


/**
 * @author wuxl
 * 用户
 */
@Getter
@Setter
@ToString
@Entity
@Table(name = "tb_user")
public class TbUser implements Serializable {

	/**
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", nullable = false)
	private Integer id;

	/**
	 * 编码--作为工号
	 */
	@Column(name = "code", length = 32)
	private String code;

	/**
	 */
	@Column(name = "nick_name", length = 32)
	private String nickName;

	/**
	 */
	@Column(name = "username", length = 32)
	private String username;
	/**
	 */
	@Column(name = "password", length = 20)
	private String password;

	/**
	 */
	@Column(name = "phone", length = 20)
	private String phone;

	/**
	 */
	@Column(name = "email", length = 64)
	private String email;

	@Column(name = "real_name", length = 20)
	private String realName;

	@Column(name = "sex")
	private String sex;

	@Column(name = "birthday")
	private Date birthday;

	@Column(name = "education")
	private String education;

	@Column(name = "school")
	private String school;

	@Column(name = "graduation_date")
	private Date graduationDate;

	/**
	 */
	@Column(name = "create_user_id")
	private Integer createUserId;

	/**
	 */
	@Column(name = "create_user_name", length = 32)
	private String createUserName;

	/**
	 */
	@CreatedDate
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time")
	private java.util.Date createTime;

	/**
	 */
	@Column(name = "last_update_id")
	private Integer lastUpdateId;

	/**
	 */
	@Column(name = "last_update_name", length = 32)
	private String lastUpdateName;

	/**
	 */
	@LastModifiedDate
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "last_update_time")
	private java.util.Date lastUpdateTime;

	/**
	 */
	@Version
	@Column(name = "version")
	private Integer version;


	@Column(name = "status")
	private String status;

	@Column(name = "no_del_flag")
	private String noDelFlag;

	@Column(name = "default_sys_id")
	private Integer defaultSysId;

	@Column(name = "default_sys_name")
	private String defaultSysName;
	@Column(name = "default_sys_img_url")
	private String defaultSysImgUrl;


	@Column(name = "exp_date")
	private Date expDate;
	@Column(name = "pwd_fail_num")
	private Integer pwdFailNum;
	@Column(name = "pwd_fail_time")
	private Date pwdFailTime;
	@Column(name = "last_login_ip")
	private String lastLoginIp;
	@Column(name = "last_login_datetime")
	private Date lastLoginTime;


	/**
	 */
	@Column(name = "tenant_id")
	private Integer tenantId;
	@Column(name = "tenant_code")
	private String tenantCode;
	@Column(name = "tenant_name", length = 128)
	private String tenantName;

	@Column(name = "feishu_user_id")
	private String feishuUserId;

}
